const KEY = {
    TOKEN: 'TOKEN',
    REFRESH_TOKEN: 'REFRESH_TOKEN',
}

export function getToken() {
    return localStorage.getItem(KEY.TOKEN)
}

export function setToken(obj: any) {
    localStorage.setItem(KEY.TOKEN, obj)
}

export function removeToken() {
    localStorage.removeItem(KEY.TOKEN)
}

export function getRefreshToken() {
    return localStorage.getItem(KEY.REFRESH_TOKEN)
}

export function setRefreshToken(obj: any) {
    localStorage.setItem(KEY.REFRESH_TOKEN, obj)
}

export function removeRefreshToken() {
    localStorage.removeItem(KEY.REFRESH_TOKEN)
}

export function removeArray(objs: Array<any>) {
    objs.filter(e => {
        localStorage.removeItem(e)
    })
}
